package com.vdong.trade.order.common.enums;

import com.vdong.trade.order.common.security.DisbPrincipal;
import lombok.Getter;
import lombok.Setter;
import org.lamb.framework.common.function.PrincipalModelFunction;

/**
 * @description: 用户模型对应的类型
 * @author: Mr.WangGang
 * @create: 2018-12-03 上午 11:52
 **/
public enum  PrincipalModelEnum implements PrincipalModelFunction {


    DISB_PRINCIPAL(DisbPrincipal.class,"disb");


    @Getter
    @Setter
    private String model;
    @Getter
    @Setter
    private Class principal;

    PrincipalModelEnum(Class<DisbPrincipal> principalClass, String principalModel) {
        this.principal = principalClass;
        this.model = principalModel;
    }


    @Override
    public String principalModel() {
        return model;
    }

    @Override
    public Class principal() {
        return principal;
    }

}
